#pragma once
#include"RBTree.h"
#include<iostream>
using namespace std;

namespace Set
{
	template<class K>
	class set
	{
		struct setofkey
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
	public:
	
		typedef typename RBTree<K, K, setofkey>::const_iterator iterator;

		typedef typename RBTree<K, K, setofkey>::const_iterator const_iterator;

		iterator begin()const 
		{
			return _t.begin();
		}
		iterator end()const 
		{
			return _t.end();
		}



		pair<iterator,bool> insert(const K& key)
		{
			pair<typename RBTree <K, K, setofkey>::iterator, bool> ret = _t.insert(key);

			return pair<iterator, bool>(ret.first, ret.second);
		}

	private:
		RBTree <K, K, setofkey> _t;
	};
}